<template>
  <div class="test">
    <h1>父组件</h1>
    {{ title }}
    <!-- <child
      :title="title"
      @update:title="changeTitle"
    ></child> -->
    <!-- <child
      :title="title"
      @update:title="(t) => (title = t)"
    ></child> -->
    <child :title.sync="title"></child>
    <!-- <child v-model="title"></child> -->
  </div>
</template>
<script>
import Child from './Child.vue'
export default {
  data() {
    return {
      title: '标题'
    }
  },
  methods: {
    // changeTitle(title) {
    //   this.title = title
    // }
  },
  components: {
    Child
  }
}
</script>
<style lang="scss" scoped></style>
